<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="/js/plugin/layui-v2.3.0/layui/css/layui.css">
	<link rel="stylesheet" href="/css/reset.css">
	<link rel="stylesheet" href="/css/index.css">
	<link rel="stylesheet" href="/css/project_set.css">
	<script src="/js/jquery-2.1.1.min.js"></script>
	<script src="/js/plugin/layui-v2.3.0/layui/layui.js"></script>
	<script src="/js/common.js"></script>
<script>
	$(document).ready(function() {
		
	});
	
</script>
<style>
.layui-form-label{
	text-align:left
}
.kb-form-container{
	padding-left:20px;
}
.layui-form-item .layui-inline{
	margin-right:0px
}
</style>
</head>
<body style="overflow-y:scroll">
<div class="addemployee-wrap" id="employee-wrap">
	<div class="kb-form-container" >
		<form class="layui-form" id="defaultForm" th:action="@{/app/customerStaff/save}" th:method="post" lay-filter="employee-form">
			<input type="hidden" id="fkTeam" name="fkTeam" th:value="${id}" />
			<fieldset class="fieldset">
				<div class="layui-form-item">
					<div class="layui-inline">
					    <label class="layui-form-label"><span class="must-fill">*</span>姓名</label>
					    <div class="layui-input-inline" style="width:230px">
					      	<input type="text" name="name" id="name" required  lay-verify="name" placeholder="" autocomplete="off" class="layui-input">
					    </div>
					</div>
					<div class="layui-inline">
					    <label class="layui-form-label" style="width:40px">花名</label>
					    <div class="layui-input-inline" style="width:210px">
					    	<input type="text" name="flowerName" id="flowerName" placeholder="" autocomplete="off" class="layui-input">
					    </div>
					</div>
				</div>
				
				<div class="layui-form-item">
				    <label class="layui-form-label">性别</label>
				    <div class="layui-input-block">
			      	<input name="sex" title="男" type="radio" value="0" checked="checked"/>
			     	 	<input name="sex" title="女" type="radio" value="1"/>
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">职务</label>
				    <div class="layui-input-block">
				      	<input type="text" name="post" id="post" placeholder="" autocomplete="off" class="layui-input">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">技能</label>
				    <div class="layui-input-block">
				      	<input type="text" name="fkDicSkill" id="fkDicSkill" placeholder="" autocomplete="off" class="layui-input">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label"><span class="must-fill">*</span>职责</label>
				    <div class="layui-input-block">
			      		<input name="duty" title="团队负责人" type="radio" value="1" />
			     	 	<input name="duty" title="财务负责人" type="radio" value="2"/>
			     	 	<input name="duty" title="团队一般成员" type="radio" value="3" checked="checked"/>
			     	 	<br>	
			     	 	<span style="color: rgb(153, 153, 153); font-size: 12px; padding: 4px 0px 0px;">只有团队负责人和财务负责人可以查看和支付公司账单</span>
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">出生日期</label>
				    <div class="layui-input-block">
				      	<input type="text" name="birthDate" id="birthDate" lay-verify="birthDate" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">出生地</label>
				    <div class="layui-input-block">
				      	<input type="text" name="birthplace" id="birthplace" placeholder="" autocomplete="off" class="layui-input">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">证件类型</label>
				    <div class="layui-input-block">
				      	<select name="certificatesType" lay-filter="aihao">
						        <option value="0">身份证</option>
						    	<option value="1">护照</option>
						    </select>
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">证件号</label>
				    <div class="layui-input-block">
				      	<input type="text" name="certificatesNumber" id="certificatesNumber" placeholder="" autocomplete="off" class="layui-input">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label"><span class="must-fill">*</span>手机号</label>
				    <div class="layui-input-block">
				      	<input type="text" name="phone" id="phone" lay-verify="phone" placeholder="" autocomplete="off" class="layui-input">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">微信号</label>
				    <div class="layui-input-block">
				      	<input type="text" name="wechat" id="wechat" placeholder="" autocomplete="off" class="layui-input">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">邮箱</label>
				    <div class="layui-input-block">
				      	<input type="text" name="mail" id="mail" placeholder="" autocomplete="off" class="layui-input">
				    </div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">兴趣爱好</label>
				    <div class="layui-input-block">
				      	<input type="text" name="hobby" id="hobby" placeholder="" autocomplete="off" class="layui-input">
				    </div>
				</div>
				
			</fieldset>
			
			<fieldset class="fieldset">	
				<div class="layui-form-item" style="">
				    <div class="layui-input-block">
				      <button class="layui-btn layui-btn-normal btn-bg" lay-submit lay-filter="formEmployee" id="submit-btn">提交</button>
				      <a class="layui-btn layui-btn-primary" onclick="closeLayer()">取消</a>
				    </div>
				</div>
			</fieldset>
		</form>	
	</div>
</div>
</body>
<script>
	
	layui.config({
	        base: '/js/plugin/layui-v2.3.0/layui/' //此处路径请自行处理, 可以使用绝对路径
	    }).extend({
	        formSelects: 'formSelects-v3'
	    }).use(['element',"layer","form",'formSelects', 'laydate'], function(){
			var layer=layui.layer,form = layui.form,formSelects = layui.formSelects,laydate = layui.laydate;
			//日期
			laydate.render({
			  elem: '#birthDate'
			});
			form.verify({
				name: function(value, item){ //value：表单的值、item：表单的DOM对象
		      	  if(value==""){
			       	  return '姓名不能为空';
			      }
			  }
				,phone: function(value, item){ //value：表单的值、item：表单的DOM对象
		      	  if(value==""){
			       	  return '手机号不能为空';
			      }
			  }
			  
			  
			}); 
			//监听提交
			  form.on('submit(formEmployee)', function(data){
				  $.post($("#defaultForm").attr('action'), data.field, function(result) {
						window.parent.layer.msg(result.msg);
						closeLayer();
					}, 'json');
					return false;
			  });
			
		});
</script>
</html>